{% extends "jpbase.html" %}
{% block title %}OVIM - JOB POOL MONITOR{% endblock %}

{% block navbar %}
<a class="navbar" href="/ovim/listjp/"> >> JobPool List</a>
{% endblock %}

{% block action %}
<div class="action">
	<h3>ACTIONS</h3>
	<div id="actionmenu">
		<ul>
			<li>
				<a href="#" title="Add a new JobPool">
					<img src="/ovim/media/img/list-add.png"/>
					New JobPool
				</a>
			</li>	
		</ul>
	</div>
</div>
{% endblock %}


{% block content %}
<div class="ovim_content">
	<h3>Job Pool</h3>
	<div class="ovim_content_box">
		<img src="/ovim/media/img/jp.jpg" class="image" />
		<h2>{{ jp.name }}</h2>
		<p class="ovim_content_box_comment">
			<img src="/ovim/media/img/Gravatar_30.gif"/>
			{% if jp.comments %}
				{{ jp.comments }}
			{% else %}
				No Comment
			{% endif %}
			<br><br>
		</p>
		<br>
		<div id="inner_content">
			<h3>Status: {{ jp.get_state_display }}</h3>
			<table>
				<tr>
					<th>VM Name</th>
					<th>Status</th>
					<th>Start</th>
				</tr>
				{% for jb in jbs %}
					<tr>
						<td><a href="/ovim/{{ jb.vm.vmhost.id }}/listvms/{{ jb.vm.id }}/"/>{{ jb.vm.name }}</td>
						<td>{{ jb.state }}</td>
						<td>
						{{ jb.startdate }}
						</td>
					</tr>
				{% endfor %}
			</table>
		</div>
	</div>
</div>
{% endblock %}